package com.login.service.impl;

import com.login.service.LoginService;
import com.login.dao.LoginMapper;
import dto.Dto;
import dto.GetAdmin;
import org.springframework.stereotype.Service;
import pojo.Admin;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class LoginServiceImpl implements LoginService {

    @Resource
    private LoginMapper loginMapper;

    @Override
    public Dto<Admin> selectadmin(String username) {
        Dto<Admin> dto=new Dto<>();
        dto.setObj(loginMapper.selectadmin(username));
        dto.setSuccess(true);
        return dto;
    }

    @Override
    public List selectAdminPer(String adminId) {
        return loginMapper.selectAdminPer(adminId);
    }

    @Override
    public List getAdmin1(Map<String,Object>  map) {
        List list=loginMapper.getAdmin1(map);
        return list;
    }

    @Override
    public int updateAdmin(List<GetAdmin> list) {
        return loginMapper.updateAdmin(list);
    }
}
